<template>
    <div class="content">
        <div class="container">
            <div class="l">
                <img src="../../../img/京东秒杀.png" alt="">
                <p>限时低价</p>
                <button>去抢购 <img src="../../../img/右箭头.png" alt=""></button>
            </div>
            <div class="r">
                <div class="scroll-wrap">
                    <div v-for="item in skillList" :key="item.id" class="item">
                        <img :src="item.img1" />
                        <span>{{ item.category }}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: ['skillList']
}
</script>

<style lang="less" scoped>
.content {
    height: 95px;
    padding: 6px 10px;
}

.container {
    width: 357px;
    height: 100%;
    border-radius: 10px;
    background-color: aqua;
    background-size: 100% 100%;
    margin: 10px auto;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-around;
    background: url(../../../img/背景2.png);
    background-size: 100% 100%;
}

.l {
    width: 76px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
    padding-left: 5px;
}

.l>img {
    width: 65px;
    height: 14px;
}

.l>p {
    font-size: 12px;
    color: white;
}

.l>button {
    width: 54px;
    border-radius: 15px;
    font-size: 10px;
    background-color: white;
    color: #fa2c19;
    border: none;
}

.l>button>img {
    width: 10px;
    height: 10px;
}

/* 父级滚动框（你已经有了） */
.r {
    width: 277px;
    height: 100%;
    padding: 2px;
    overflow-x: auto;
    /* 关键：横向滚动 */
}

.scroll-wrap {
    height: 100%;
    display: flex;
    flex-wrap: nowrap;
    /* 强制一行 */
    align-items: center;
    gap: 8px;
    padding: 0 6px;
    overflow-x: auto;
    /* 横向滚动 */
    background: white;
    border-radius: 12px;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    text-align: center;
    font-size: 10px;
    img {
        width: 40px;
        height: 40px;
    }
}
</style>